/**
 * 通用顶部导航栏样式
 * 适用于所有页面的顶部导航
 */

/* 顶部导航栏样式 */
.header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    background-color: white;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 0 2rem;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-nav {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
}

.nav-item {
    margin: 0 0.75rem;
    position: relative;
}

.nav-item a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item a:hover {
    color: var(--primary-color);
}

.nav-item.active a {
    color: var(--primary-color);
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
}

.header-actions .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    margin-left: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.header-actions .btn-icon:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

.header-actions .btn-icon.has-notification::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background-color: var(--danger-color);
    border-radius: 50%;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;
    cursor: pointer;
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 0.75rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.user-role {
    font-size: 0.75rem;
    color: #6c757d;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    width: 180px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 100;
    overflow: hidden;
}

.user-dropdown.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

.dropdown-item .icon {
    margin-right: 0.75rem;
    color: #6c757d;
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.05);
    margin: 0.25rem 0;
}

.logout-item {
    color: var(--danger-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-color);
    font-size: 1.5rem;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .header {
        padding: 0 1rem;
    }
    
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        margin-right: 1rem;
    }
}

@media (max-width: 576px) {
    .user-info {
        display: none;
    }
} 